from time import sleep

from selenium.webdriver.common.by import By
from web.page_object.base_page import BasePage
from web.page_object.calendar_page import CalendarPage


class FeishuPage(BasePage):
    _BASE_URL = "https://www.feishu.cn/"

    def goto_calendar(self):
        self.find(By.CSS_SELECTOR, '[data-elem-id="RgUrMDgfe8"]').click()
        self.find(By.CSS_SELECTOR, '.headerExtra_productList').click()
        self.find(By.CSS_SELECTOR, '[title="日历"]').click()
        self.switch_to_new_windows()
        return CalendarPage(self.driver)

    def goto_messages(self):
        pass
